<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <title>Porba - Easy ERP</title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>
    <script type="text/javascript">
        //FUNCTIONS FOR THE CLOCK
        function startTime(){
            var today=new Date();
            var h=today.getHours();
            var m=today.getMinutes();
            var s=today.getSeconds();
            // add a zero in front of numbers<10
            m=checkTime(m);
            s=checkTime(s);
            document.getElementById('txt').innerHTML=h+":"+m+":"+s;
            t=setTimeout('startTime()',500);
        }
        function checkTime(i){
            if (i<10){
                i="0" + i;
            }
            return i;
        } //END FUNCTIONS FOR CLOCK
    </script>
</head>
<body onload="startTime()"><!-- start the clock -->
<div id="top">
    <a href="<?php echo url_for('sales_index_contacts')?>"><div id="logo"></div></a>
    <div id="clock">
        <div id="ClockTime" ><div id="txt"></div></div> <!-- the clock -->
    </div>
    <div id="calendar">
        <div id="bg_calendar">
            <?php
            //date_default_timezone_set(Europe/Amsterdam); //set time zone - NEEDS TO BE INSTALLED/can be changed!
            $date = getdate(); //get the date
            $month = $date['month']; //get month
            $day = $date['mday']; //get day
            echo '<p id="datemonth">' . $month . '</p>'; //the current month
            echo '<p id="dateday">' . $day . '</p>'; //the current date
            ?>
        </div>
    </div> 
    <?php if ($sf_user->isAuthenticated()) { ?>
    <div id="log">
        <p><?php echo $sf_user->getUsername() ?></p>
        <ul>
            <a href=""><li><img src="<?php echo image_path('Buttons/bt_log_edit.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_log_edit_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_log_edit.png') ?>'" alt="Help"/></li></a>
            <a href="<?php echo url_for('sf_guard_signout') ?>"><li><img src="<?php echo image_path('Buttons/bt_log_logout.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_log_logout_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_log_logout.png') ?>'" alt="Help"/></li></a>
        </ul>
    </div>
    <?php } ?>
    <div id="help">
        <a href=""><img src="<?php echo image_path('Buttons/bt_help.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_help_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_help.png') ?>'" alt="Help"/></a>
    </div>
</div><!-- close top -->
<?php echo $sf_content ?>
<div id="copy">
     <p>Porba &copy; 2012 - All right reserved</p>
</div>
</body>
</html>
